<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>旋转</title>
  <style>
    .outer {
      width: 200px;
      height: 200px;
      border: 2px solid black;
      margin: 0 auto;
      margin-top: 100px;
      /*开启3D空间 给父元素添加*/
      transform-style: preserve-3d;
      /*设置景深*/
      perspective: 500px;
    }
    .son {
      width: 200px;
      height: 200px;
      background-color: deepskyblue;
      /*Y轴旋转*/
      /*transform: rotateY(150deg);*/
      /*X轴旋转*/
      /*transform: rotateX(30deg);*/
      /*x,y,z 方向上各旋转多少度*/
      transform: rotate3d(1,1,1,30deg);
    }
  </style>
</head>
<body>
<div class="outer">
  <div class="son">
    <div class="test">你好啊</div>
  </div>
</div>
</body>
</html>